<template>
    <div class = "basenav">
            <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" >
            <el-menu-item  @click = "baseadd" index="1">基地添加</el-menu-item>
            <el-menu-item v-if = "Boole===1" @click = "itemsadd" index="2">介绍添加</el-menu-item>
            <!-- <el-menu-item v-if = "Boole===1" @click = "projectadd" index="3">项目添加</el-menu-item> -->
            </el-menu>
            <router-view></router-view>
    </div>
</template>
<script>
export default {
    data(){
        return{
        activeIndex:'1',
        Data:'',
        Boole:null
        }
    },
    created() {
        this.List()
    },
    methods:{
        List(){
            this.baseId = this.$route.query.baseId
            if(this.baseId){
                this.Boole = 1
            } else {
                this.Boole = 0
            }
        },
        baseadd(){
            this.$router.push(`Addbaseone?baseId=${this.baseId}&compile=${this.$route.query.compile}`)
        },
        itemsadd(){
            this.$router.push(`Addbasetwo?baseId=${this.baseId}&compile=${this.$route.query.compile}`)
        },
        handleSelect(){

        },
        select(){

        }
    }
}
</script>
<style scoped>
    .basenav{
        width:100%;
    }
    .el-menu{
        width:100%;
    }
</style>
